From 7ef969e97e42e81aad1c6f8e67220583c7447bb3 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 22 Mar 2006 10:36:22 +0100 Subject: [PATCH] SVM patch to enable SMI intercept. Signed-off-by: Tom Woller --- xen/arch/x86/hvm/svm/svm.c | 9 +++++++++ xen/arch/x86/hvm/svm/vmcb.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index a19468a9a0..4e6965feac 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2414,6 +2414,15 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs regs) do_nmi(®s, 0); break; + case VMEXIT_SMI: + /* + * For asynchronous SMI's, we just need to allow global interrupts + * so that the SMI is taken properly in the context of the host. The + * standard code does a STGI after the VMEXIT which should accomplish + * this task. Continue as normal and restart the guest. + */ + break; + #ifdef XEN_DEBUGGER case VMEXIT_EXCEPTION_BP: svm_debug_save_cpu_user_regs(®s); diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c index 00e06d86b0..eeca39ee68 100644 --- a/xen/arch/x86/hvm/svm/vmcb.c +++ b/xen/arch/x86/hvm/svm/vmcb.c @@ -123,7 +123,7 @@ static int construct_vmcb_controls(struct arch_svm_struct *arch_svm) GENERAL1_INTERCEPT_RDTSC | GENERAL1_INTERCEPT_PUSHF | GENERAL1_INTERCEPT_SWINT | GENERAL1_INTERCEPT_POPF | GENERAL1_INTERCEPT_IRET | GENERAL1_INTERCEPT_PAUSE | - GENERAL1_INTERCEPT_TASK_SWITCH + GENERAL1_INTERCEPT_TASK_SWITCH | GENERAL1_INTERCEPT_SMI ); /* turn on the general 2 intercepts */ -- 2.30.2